using System;
using System.Xml.Serialization;
using System.Collections.Generic;
using System.IO;
using System.Text;

namespace SharePointing.Features.MetaTags
{
    [XmlRootAttribute(ElementName="PageTag", IsNullable=false)]
    public class PageTag
    {
        private bool _override;
        private string _keywords;
        private string _author;
        private string _description;

        public bool Override
        {
            get { return _override;  }
            set { _override = value; }
        }

        public string Keywords
        {
            get { return _keywords; }
            set { _keywords = value; }
        }

        public string Author
        {
            get { return _author; }
            set { _author = value; }
        }

        public string Description
        {
            get { return _description; }
            set { _description = value; }
        }

        public bool HasData()
        {
            // returns true if there is data populated
            bool _hasData = false;
            if(!String.IsNullOrEmpty(_keywords))
            {
                _hasData = true;
            }
            if (!String.IsNullOrEmpty(_author))
            {
                _hasData = true;
            }
            if (!String.IsNullOrEmpty(_description))
            {
                _hasData = true;
            }
            return _hasData;
        }

        public bool HasKeywords()
        {
            bool _hasData = false;
            if (!String.IsNullOrEmpty(_keywords))
            {
                _hasData = true;
            }
            return _hasData;
        }

        public bool HasAuthor()
        {
            bool _hasData = false;
            if (!String.IsNullOrEmpty(_author))
            {
                _hasData = true;
            }
            return _hasData;
        }

        public bool HasDescription()
        {
            bool _hasData = false;
            if (!String.IsNullOrEmpty(_description))
            {
                _hasData = true;
            }
            return _hasData;
        }
    }
}
